package com.xp.code.util;

import java.io.Serializable;

/**
 * 
 * @author HAHA
 * 
 */
public class XPCodeSession extends WebSession implements Serializable {

	private static final long serialVersionUID = -2884485451705078116L;
	private final String USERID = "userID";
	private final String USERCODE = "userCode";
	private final String USERNAME = "userName";
	private final String DEPTID = "deptID";
	private final String DEPTNAME = "deptName";
	private final String UNITID = "unitID";
	private final String UNITNAME = "unitName";

	public XPCodeSession() {
		super();
	}

	public void setAttr(String name, String attr) {
		this.setAttribute(name, attr);
	}

	public String getAttr(String name) {
		Object o = this.getAttribute(name);
		return (o != null ? o.toString() : "");
	}

	public String getUSERID() {
		return getAttr(USERID);
	}

	public void setUSERID(String uSERID) {
		setAttr(USERID, uSERID);
	}

	public String getUSERCODE() {
		return getAttr(USERCODE);
	}

	public void setUSERCODE(String uSERCODE) {
		setAttr(USERCODE, uSERCODE);
	}

	public String getUSERNAME() {
		return getAttr(USERNAME);
	}

	public void setUSERNAME(String uSERNAME) {
		setAttr(USERNAME, uSERNAME);
	}

	public String getDEPTID() {
		return getAttr(DEPTID);
	}

	public void setDEPTID(String dEPTID) {
		setAttr(DEPTID, dEPTID);
	}

	public String getDEPTNAME() {
		return getAttr(DEPTID);
	}

	public void setDEPTNAME(String dEPTNAME) {
		setAttr(DEPTNAME, dEPTNAME);
	}

	public String getUNITID() {
		return getAttr(UNITID);
	}

	public void setUNITID(String uNITID) {
		setAttr(UNITID, uNITID);
	}

	public String getUNITNAME() {
		return getAttr(UNITNAME);
	}

	public void setUNITNAME(String uNITNAME) {
		setAttr(UNITNAME, uNITNAME);
	}

}
